package collection;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.lang.reflect.Field;

public class Erasure1<T> {

    private T name;

    public T getName() {
        return name;
    }

    public void setName(T name) {
        this.name = name;
    }

    public static void main(String[] args) throws NoSuchFieldException {
        Erasure1<Integer> e1 = new Erasure1<>();

        Class<? extends Erasure1> aClass = e1.getClass();
        Field name1 = aClass.getDeclaredField("name");
        System.out.println(name1.getType().getName());

        C4 c4 = new C4();
        Class<? extends C4> aClass1 = c4.getClass();



    }
}

@Data
@AllArgsConstructor
@NoArgsConstructor
class C4{
    private Integer age;
}
